//
//  YD_publishConversationCell2.m
//  SpeedDating
//
//  Created by smile on 2017/1/15.
//  Copyright © 2017年 isu. All rights reserved.
//

#import "FriendlocationConversationCell.h"

@implementation FriendlocationConversationCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+(instancetype)cellWithTableView:(UITableView*)tableView {
    static NSString *ID = @"FriendlocationConversationCell";
    FriendlocationConversationCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if(cell==nil){
        cell = [[FriendlocationConversationCell  alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
        cell.backgroundColor =[UIColor whiteColor];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
        return cell;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
        
         self.imageV = [[UIImageView alloc]init];
        self.imageV.contentMode = UIViewContentModeScaleAspectFill;
        [self.contentView addSubview:self.imageV];
        [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(15);
            make.centerY.mas_equalTo(self.contentView);
            make.size.mas_equalTo(CGSizeMake(16*SCREEN_WIDTH_RATIO47, 13*SCREEN_WIDTH_RATIO47));
        }];
        
        self.showLab =[UILabel new];
        [self.contentView addSubview:self.showLab];
        [self.showLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(self.contentView);
            make.left.mas_equalTo(self.imageV.mas_right).offset(15);
        }];
        
        self.showLab2 =[UILabel new];
        [self.contentView addSubview:self.showLab2];
        self.showLab2.textAlignment = NSTextAlignmentRight;
        [self.showLab2 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(self.contentView);
            make.right.mas_equalTo(self.contentView).offset(-15);
            make.left.mas_equalTo(self.showLab.mas_right).offset(15);
        }];
        self.showLab2.textColor =[UIColor lightGrayColor];
        
        UIView *line = [UIView new];
        [self.contentView addSubview:line];
        [line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.showLab);
            make.bottom.right.mas_equalTo(self.contentView);
            make.height.mas_equalTo(0.5);
        }];
        line.backgroundColor = [UIColor lightGrayColor];
        
        self.tapG = [[UITapGestureRecognizer alloc]init];
        [self.contentView addGestureRecognizer:self.tapG];
    }
    return self;
}
@end
